package aexp.customadapter;

public class Weather {
  public static final int NA = -1;
  public static final int SUNNY = 0;
  public static final int OVERCAST = 1;
  public static final int RAIN = 2;

  public String city = null;
  public int temperature = 0;
  public int sky = NA;

  public Weather( String city, int temperature, int sky ) {
    this.city = city;
    this.temperature = temperature;
    this.sky = sky;
  }

  public String getCity() {
	return city;
  }

  public int getTemperature() {
	return temperature;
  }

  public int getSkyResource() {
	switch( sky ) {
	  case SUNNY:
			return R.drawable.weather_sunny;

	  case OVERCAST:
			return R.drawable.weather_overcast;

	  case RAIN:
			return R.drawable.weather_rain;
	}
	return R.drawable.unknown;
  }
}
